Join

Entity-Related Operation Statement

Syntax samples

JOIN <expression> <entity name> {,<priority>}

JOIN 4 EntA

JOIN Var1 EntA, 1

Description

Joins a specified quantity of a designated entity type to the current entity. The entities joined to the current entity lose their identities and any resources owned by the joining entities are transferred automatically to the base entity. Use JOIN to simulate a component being assembled to a main part, such as when wings are attached to the fuselage of an airplane.

Entities to be joined must be routed to the current location with a JOIN rule. The current entity waits until enough entities to fill its request have been routed to the current location with a JOIN rule.

The resulting entity retains the attributes and name of the base entity. To transfer attributes from the joining entity to the current entity, in the exit logic for the joining entity, copy the desired attribute to a global variable. Then assign the global variable to the attribute of the base entity after the JOIN statement in the processing logic.

All resources owned by the joining entity are transferred to the base entity.

To JOIN an entity with a specific attribute value to another entity with the same attribute value, use the LOAD PERM statement .

Valid In

Operation logic only. More than one JOIN statement may be used in the same logic.

Components

<expression>

The number of entities to be joined. A zero value is ignored and a negative value generates an error. This expression is evaluated when each entity first encounters it, but is not re-evaluated as the requested entities are joined.

<entity name>

The entity type to be joined to the base entity. Joining entities must come from a JOIN routing and lose their identity once joined.

<priority>

An entity with a higher priority will have arriving entities joined to it before one with a lower priority. This expression should be a number between 0 and 999. For more information on priorities, see Priorities, at the beginning of this section.

Explicit Entity Actions

JOIN passes cost on to the base entity but not statistical information. ProModel counts joined entities as exits.

Example

A certain location on an assembly line manufacturing cars attaches doors built on another assembly line. When the Body of the car arrives at the Assembly location, we attach a left door, Ldoor, and a right door, Rdoor, with a JOIN statement. The paint station paints the doors and routes them to Assembly with a JOIN rule. Note that the Body will wait until we join both doors before routing to the next location.

Process Table

Entity

Location

Operation (min)

Rdoor

Paint

WAIT 30

Ldoor

Paint

WAIT 30

Body

Assembly

JOIN 1 Ldoor

JOIN 1 Rdoor

Routing Table

Blk

Output

Destination

Rule

Move Logic

1

Rdoor

Assembly

JOIN 1

MOVE FOR 30

1

Ldoor

Assembly

JOIN 1

MOVE FOR 30

1

EntB

Cleaning

FIRST 1

MOVE FOR 5

See Also

LOAD, COMBINE, and GROUP. Also see Attributes.